function mytemplate(id,data){
        var str = document.querySelector("#"+id).innerHTML;
        var pattern = /\s*{{([a-zA-Z]+)}}\s*/;
        var re = null;
        while(re = pattern.exec(str)){
            str = str.replace(re[0],data[re[1]]);
        }
        return str;
    }